package org.example;

import org.example.io.WriterTemplate;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import java.io.IOException;
import java.sql.SQLException;

import org.springframework.context.ConfigurableApplicationContext;

/**
 * Hello world!
 */
@SpringBootApplication
public class App {
    public static void main(String[] args) throws SQLException, IOException {
        ConfigurableApplicationContext ctx = SpringApplication.run(App.class, args);
        WriterTemplate writerTemplate = ctx.getBean(WriterTemplate.class);
        writerTemplate.write("自动配置其实很简单！");
        System.out.println("Hello World!");
    }
}
